<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
<link rel="stylesheet" href="style.css">
<title>Student Profile</title>
<script language="JavaScript" type="text/javascript">
function doValidation() {
	 var userid = document.getElementById("userid").value;
	 var password = document.getElementById("password").value;	 
	 if (userid==""||password=="")
		{
		alert("Userid and Password should not be blank. Please enter appropriately!");
		return false;
		}
	 return true;
}
</script>
</head>
 
<body>

<s:if test="hasActionErrors()">
   <div class="errors">
      <s:actionerror/>
   </div>
</s:if>

<center><h1><b>Welcome to Student Information System</b></h1></center>
<s:form action="login">

<table align="center">
<tr><b><h1 align="center"><b><!-- Welcome to Student Profile System --></b></h1></b></tr>
<tr>
<td><img src="images/login.jpg" width="200" height="100"/></td>
<td><table id="text">
    <td><s:textfield name="userid" label = "User ID" id="userid" size="20" /></td>
    <td><s:password name="password" label="Password" id="password" size="20" /></td>
    </tr>
</table></td>
<tr></tr>
<tr></tr>
<tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
<tr><s:submit name = "commandButton" id="mysubmit" value="Login!" onClick="return doValidation()" align="center" /></tr>
</table>    
</s:form>
</body>
</html>
